<?php

	require_once("../Database.php");

	class TestUsers{
		
		public $db;
		
		public function __construct($db){
			$this->db = $db;
		}
		
		public function test_getUsers(){
			print("<h3>Test getUsers()</h3>");
			
			$users = $this->db->db_getUsers();

			foreach($users as $user){
				foreach($user as $key => $value) {
				    
				
					if(is_array($value)){
						print "$key : ";
						print_r($value);
						print("<br/>");
					}else{
						print "$key : $value<br/>";
					}
				}
			}

		}
		
		public function test_getUser($login, $password){
			print("<h3>Test getUser(login, password)</h3>");
			
			$user = $this->db->db_getUser($login, $password);

			foreach($user as $key => $value) {
			
				if(is_array($value)){
					print "$key : ";
					print_r($value);
					print("<br/>");
				}else{
					print "$key : $value<br/>";
				}
			}
			
		}
		
	}
	


?>